<%@page import="java.util.Date"%>
<%@page import="cn.school.servies.*,cn.school.entity.*,java.text.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
String name=request.getParameter("sname");
String sex=request.getParameter("sex");
long gradeid=Long.parseLong(request.getParameter("gradeid"));
String birthday=request.getParameter("birthday");
SimpleDateFormat fomart=new SimpleDateFormat("yyyy-MM-dd");
 Date date=fomart.parse(birthday);
StudentSerive ss=new StudentSerive();
Student stu=new Student();
stu.setGradeid(gradeid);
stu.setSex(sex);
stu.setSname(name);
stu.setBirthday(date);
int a=ss.add(stu);
%>
添加了<%=a %>学生
</body>
</html>